﻿using IRepositoryDal;
using Microsoft.EntityFrameworkCore;
using RepositoryEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RepositoryDal
{
    /// <summary>
    /// 用户数据库访问层
    /// </summary>
    public class UserInfoDal : BaseDal<UserInfo>, IUserInfoDal
    {
        //数据库上文
        RepositoryDbContext _DbContext;

        public UserInfoDal(RepositoryDbContext DbContext) : base(DbContext)
        {
            _DbContext = DbContext;
        }

        //public void Delete(List<UserInfo> deleteEntityInfos)
        //{
        //    throw new NotImplementedException();
        //}

        //public void Delete(List<UserInfo> deleteEntityInfos)
        //{
        //    throw new NotImplementedException();
        //}

        //public DbSet<UserInfo> GetLeaderDb()
        //{
        //    return _DbContext.UserInfo;
        //}



        /// <summary>
        /// 根据id获取用户信息
        /// </summary>
        /// <param name="userInfoId">用户id</param>
        /// <returns></returns>
        //public UserInfo GetUserInfo(string userInfoId)
        //{
        //    UserInfo userInfo = _DbContext.UserInfo.FirstOrDefault(u => u.ID == userInfoId);
        //    return userInfo;
        //}

        /// <summary>
        /// 获取用户集合
        /// </summary>
        /// <returns></returns>
        //public List<UserInfo> GetUserInfos()
        //{
        //    return _DbContext.UserInfo.ToList();
        //}

        /// <summary>
        /// 获取用户集合（未真实查询出来的数据）
        /// </summary>
        /// <returns></returns>
        //public DbSet<UserInfo> GetUserInfosDb()
        //{
        //    return _DbContext.UserInfo;
        //}
        /// <summary>
        /// 获取用户集合
        /// </summary>
        /// <returns></returns>


    }
}
